<!DOCTYPE html>
<html lang="en">
<head> 
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标题</title>
</head>
<body>
    <p class="p"></p>
    <!-- 使用axios库，获取省份列表数据，展示到页面上 -->
    <!-- 1.引入axios库 -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        // 2.使用axios函数
        axios({
            url: 'https://hmajax.itheima.net/api/province'
        }).then(result=>{    
            console.log(result);
            console.log(result.data.list);
            console.log(result.data.list.join('<br>'))
            // 3.将数据展示到页面上
            document.querySelector('.p').innerHTML = result.data.list.join('<br>')
        })
    </script>
</body>
</html>